V = Variables
R = Reading functions
SIGNED WORD —→ BINARY
The VR10SWrToBin function Converts a Signed Word variable type (word with sign) in a Binary variable type.
VR10SWrToBin (value, index, array, errcode)
Parameters:
| IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
|---|---|---|---|---|
| IN | GLOBAL | value | W | Data value to convert |
| IN | GLOBAL | index | L | Index of the array element to start the “deposit” of the converted data |
| OUT | ARRGBL | array | B | Array containing the converted data (must be declared with at least “index + 1” items) |
| OUT | GLOBAL | errcode | F | Variable that indicates a possible error on the function |
Una volta richiamata la funzione, 'errcode' può assumere determinati valori, il significato di tali valori è riassunto di seguito:
0: Nessun errore
Trasforma il valore -100 (signed word) in un valore binario
value = -100 index = 1 VR10SWrToBin (value, index, array, errcode) ;Sull'array si troverà : ; array[1] = -1 ; array[2] = -20